Skip to content

Adds an Attribute assertion to metric data test#3487

Merged
MadVikingGod merged 7 commits into
open-telemetry:mainfrom
MadVikingGod:mvg/attribute-checker
Nov 29, 2022
Merged

Adds an Attribute assertion to metric data test#3487
MadVikingGod merged 7 commits into
open-telemetry:mainfrom
MadVikingGod:mvg/attribute-checker

Conversation

@MadVikingGod
Copy link
Copy Markdown
Contributor

This is an attempt to solve the immediate problem of #3435.

It creates a new Assert function that will check if the attributes on ALL DataPoints contain the Attributes provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 21, 2022

Codecov Report

Attention: Patch coverage is 95.04132% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.0%. Comparing base (d7b3115) to head (6774d23).
Report is 1824 commits behind head on main.

Files with missing lines Patch % Lines
sdk/metric/metricdata/metricdatatest/assertion.go 89.1% 4 Missing ⚠️
...dk/metric/metricdata/metricdatatest/comparisons.go 97.6% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #3487     +/-   ##
=======================================
+ Coverage   77.9%   78.0%   +0.1%     
=======================================
  Files        165     165             
  Lines      11634   11755    +121     
=======================================
+ Hits        9066    9179    +113     
- Misses      2372    2380      +8     
  Partials     196     196             
Files with missing lines Coverage Δ
...dk/metric/metricdata/metricdatatest/comparisons.go 97.5% <97.6%> (+<0.1%) ⬆️
sdk/metric/metricdata/metricdatatest/assertion.go 80.6% <89.1%> (+5.2%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MadVikingGod MadVikingGod merged commit 289a612 into open-telemetry:main Nov 29, 2022
@MadVikingGod MadVikingGod deleted the mvg/attribute-checker branch November 29, 2022 20:32
@MrAlias MrAlias added this to the Metric v0.34.0 milestone Dec 6, 2022
@MrAlias MrAlias mentioned this pull request Jan 28, 2023
@MrAlias MrAlias added the area:metrics Part of OpenTelemetry Metrics label Jun 24, 2025
dashpole added a commit that referenced this pull request May 14, 2026
Fix #8299

Relevant upstream v1.41.0 release notes:

> ### 🛑 Breaking changes 🛑
> 
> - `graphql`: Change `graphql.document` attribute requirement level
from Recommended to Opt-In due to sensitive data, cardinality, and size
concerns
([#2985](open-telemetry/semantic-conventions#2985))
> - `process`: Move process.executable to its own entity.
([#3535](open-telemetry/semantic-conventions#3535))
> - `process`: Update requirement levels for process attributes to
ensure consistent identification and description across platforms.
([#864](open-telemetry/semantic-conventions#864))
> - `rpc`: Remove `client.address` and `client.port` attributes from RPC
server spans.
([#3487](open-telemetry/semantic-conventions#3487),
[#3488](open-telemetry/semantic-conventions#3488))
> 
> ### 💡 Enhancements 💡
> 
> - `Go`: Add opt-in go.memory.gc.pause.duration histogram metric.
([#3353](open-telemetry/semantic-conventions#3353))
> - `deployment`: Stabilize `deployment.environment.name` attribute.
([#3339](open-telemetry/semantic-conventions#3339))
> - `deployment`: Add enum values for `deployment.environment.name`
attribute.
([#2910](open-telemetry/semantic-conventions#2910))
> - `go`: Add the go.cpu.time opt-in metric, and add
go.cpu.detailed_state and go.memory.detailed_type attributes to CPU and
memory metrics respectively with wildcard values.
([#3354](open-telemetry/semantic-conventions#3354))
> - `go`: Add the opt-in go.memory.gc.cycles metric.
([#3353](open-telemetry/semantic-conventions#3353))
> - `telemetry`: Promote `telemetry.distro.name` and
`telemetry.distro.version` attributes to 'stable'.
([#3650](open-telemetry/semantic-conventions#3650))

This PR also:
- fixes semconv migration generation to ignore unexported declarations
when computing renames/removals
- upgrades repo imports, depguard, docs, templates, and schema URL
expectations to `go.opentelemetry.io/otel/semconv/v1.41.0`
- adds missing generated-file headers to semconvkit templates and
regenerates the affected `v1.41.0` files via `TAG="v1.41.0" make
semconv-generate`

---------

Co-authored-by: David Ashpole <dashpole@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:metrics Part of OpenTelemetry Metrics

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants